import { BaseController, CoolController } from "@cool-midway/core";
import { Inject, Get } from "@midwayjs/core";
import { ProviderOverviewService } from "../../service/overview";
import { Context } from "@midwayjs/koa";

@CoolController({
  service: ProviderOverviewService,
})
export class ProviderOverviewController extends BaseController {
  @Inject()
  providerOverviewService: ProviderOverviewService;

  @Inject()
  ctx: Context

  @Get('/overview', { summary: '服务人员概览：个人信息、团队成员及排班、团队车辆、团队媒体' })
  async overview() {
    return this.ok(await this.providerOverviewService.overview(this.ctx.provider.id));
  }
}


